import request from '@/utils/request'
// custom对象会覆盖全局，且保留未设置的属性
// showMsg 请求成功是否展示msg
export default {
  comments(data) {
    return request.get('/comments', { params: data, /* custom: {showMsg: true} */}, )
  },
  login(data) {
    return request.post('/posts', data, {custom: {showMsg: true}})
  },
  uploadImg(data) {
    return request.upload('/upload/img', {custom: {showMsg: true}})
  }
}
